<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">
    <h:head>
        <title>All Users</title>
    </h:head>
    <h:body>
        <f:view>
            <h:form>
                <h:dataTable value="#{event.events}" border="1" var="event">
                    <f:facet name="header">
                        <h:outputText value="List of Vehicles"/>
                    </f:facet>
                    <h:column id="column1">
                        <f:facet name="header">
                            <h:outputText value="ID"/>
                        </f:facet>
                        <h:outputText value="#{event.id}"/>
                    </h:column>
                    <h:column id="column2">
                        <f:facet name="header">
                            <h:outputText value="Date"/>
                        </f:facet>
                        <h:outputText value="#{event.date}"/>
                    </h:column>
                    <h:column id="column3">
                        <f:facet name="header">
                            <h:outputText value="Depart JCU"/>
                        </f:facet>
                        <h:outputText value="#{event.service.departTime}"/>
                    </h:column>
                    <h:column id="column4">
                        <f:facet name="header">
                            <h:outputText value="Service Time"/>
                        </f:facet>
                        <h:outputText value="#{event.service.startTime}"/>
                    </h:column>
                    <h:column id="column5">
                        <f:facet name="header">
                            <h:outputText value="Return JCU"/>
                        </f:facet>
                        <h:outputText value="#{event.service.returnTime}"/>
                    </h:column>
                    <h:column id="column6">
                        <f:facet name="header">
                            <h:outputText value="Driver"/>
                        </f:facet>
                        <h:outputText value="#{event.driver.name}"/>
                    </h:column>
                    <h:column id="column7">
                        <f:facet name="header">
                            <h:outputText value="Transportation"/>
                        </f:facet>
                        <h:outputText value="#{event.vehicle.name}"/>
                    </h:column>
                    <h:column id="column8">
                        <f:facet name="header">
                            <h:outputText value="Site"/>
                        </f:facet>
                        <h:outputText value="#{event.service.location}"/>
                    </h:column>
                    <h:column id="column9">
                        <f:facet name="header">
                            <h:outputText value="Number Attending"/>
                        </f:facet>
                        <h:outputText value="#{event.service.transnumb}"/>
                    </h:column>
                    <h:column id="column10">
                        <f:facet name="header">
                            <h:outputText value="Notes"/>
                        </f:facet>
                        <h:outputText value="#{event.notes}"/>
                    </h:column>
                </h:dataTable>
                <br/>
                <h:commandButton value="Return to home" action="#{user.returnHome}"/>
            </h:form>
        </f:view>
    </h:body>
</html>